﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace UIapp.Plantillas
{
    public partial class frmErrorMessage : Telerik.WinControls.UI.ShapedForm
    {
        public frmErrorMessage(Exception e)
        {
            InitializeComponent();
            if (e != null)
            {
                this.txtError.Text = e.Message +
                                     Environment.NewLine +
                                     Environment.NewLine +
                                     e.StackTrace +
                                     Environment.NewLine +
                                     Environment.NewLine +
                                     e.InnerException;
            }
        }

        public frmErrorMessage(string message, string details)
        {
            InitializeComponent();
            txtError.Text = message + Environment.NewLine + Environment.NewLine + details;
        }

        private void btnAceptar_Click(object sender, EventArgs e)
        {
            this.Close();
        }
    }
}
